package com.itheima.bakery.demos.web.Repositories;
import com.itheima.bakery.demos.web.model.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Optional;
@Repository
public interface UserRepository extends JpaRepository<User, Integer> {
    Optional<User> findByEmail(String email);
    List<User> findBynameContainingOrEmailContaining(String searchKeyword, String searchKeyword2);
}


